package danran.rpc.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * @Classname LoadBalanceProperties
 * @Description TODO
 * @Date 2021/9/29 16:16
 * @Created by ASUS
 */
@EnableConfigurationProperties(LoadBalanceProperties.class)
@ConfigurationProperties(prefix = "danran.loadbalancer")
public class LoadBalanceProperties {

    /**
     * 服务负载的高负载阈值，默认0.8
     */
    private double loadHigh = 0.8;

    /**
     * 服务负载的低负载阈值，默认0.2
     */
    private double loadLow = 0.2;

    public double getLoadHigh() {
        return loadHigh;
    }

    public void setLoadHigh(double loadHigh) {
        this.loadHigh = loadHigh;
    }

    public double getLoadLow() {
        return loadLow;
    }

    public void setLoadLow(double loadLow) {
        this.loadLow = loadLow;
    }
}
